#include "SkyboxTextures.h"

#define NUMBER_SKYBOXES 2

int active_skybox_idx = 0;
CubeTexture active_skybox;

CubeTexture skyboxes[] = {
	{ 
	  { TEXPATH_SKYBOX1_XZ0, TEXPATH_SKYBOX1_XZ1, TEXPATH_SKYBOX1_ZY0, TEXPATH_SKYBOX1_ZY1, TEXPATH_SKYBOX1_XY0, TEXPATH_SKYBOX1_XY1 },
	  { TEXID_SKYBOX1_XZ0, TEXID_SKYBOX1_XZ1, TEXID_SKYBOX1_ZY0, TEXID_SKYBOX1_ZY1, TEXID_SKYBOX1_XY0, TEXID_SKYBOX1_XY1 }
	},
	{ 
	  { TEXPATH_SKYBOX2_XZ0, TEXPATH_SKYBOX2_XZ1, TEXPATH_SKYBOX2_ZY0, TEXPATH_SKYBOX2_ZY1, TEXPATH_SKYBOX2_XY0, TEXPATH_SKYBOX2_XY1 },
	  { TEXID_SKYBOX2_XZ0, TEXID_SKYBOX2_XZ1, TEXID_SKYBOX2_ZY0, TEXID_SKYBOX2_ZY1, TEXID_SKYBOX2_XY0, TEXID_SKYBOX2_XY1 }
	}
};

void loadSkyboxTextures() {

	active_skybox = skyboxes[0];
	
	for(int j = 0; j < NUMBER_SKYBOXES; ++j)
		for(int i = 0; i < 6; ++i)
			loadTexture(skyboxes[j].paths[i], skyboxes[j].ids[i]);
}

void nextSkybox() {
	if( ++active_skybox_idx == NUMBER_SKYBOXES )
		active_skybox_idx = 0;
	active_skybox = skyboxes[active_skybox_idx];
}